package cn.netbox.spring.service.impl;

import cn.netbox.spring.service.MyService;
import org.springframework.stereotype.Service;

/**
 * description:
 * date: 2021/12/4 19:14
 * author: Alex
 * version: 1.0
 */
@Service
public class MyServiceImpl implements MyService {
        @Override
        public void methodA() {
            System.out.println("运行方法A");
        }

    @Override
    public void methodA(int id, String name) {
        System.out.println("执行带参数的方法A");
    }

    @Override
    public String methodB() {
        System.out.println("执行methodB");
        return "hello";
    }

    @Override
    public String methodC() {
        System.out.println("执行方法C");
        return "methodC";
    }

    @Override
    public void methodD(String name,Integer id) throws Exception {
        System.out.println("执行方法D");
        throw new Exception("我饿了");
    }
}
